#!/bin/sh
#
# info -- get the info of a specified lab
#
# Copyright (C) 2016-2021 Wu Zhangjin <falcon@ruma.tech>
#

TOP_DIR="$(cd "$(dirname "$0")"/../../ && pwd)"
. "$TOP_DIR"/tools/docker/config >/dev/null

# Check status
lab_id=$(docker ps -f name=$CONTAINER_NAME -f status=running -q)
[ -z "$lab_id" ] && err_print "$LAB_NAME is not running." && exit 1

get_vars VNC_IP VNC_TOKEN VNC_PWD VNC_PWD_VIEWONLY UNIX_USER UNIX_PWD

echo
echo "IP: $VNC_IP"
echo "Unix User: $UNIX_USER"
echo "Unix Password: $UNIX_PWD"
echo
echo "VNC Token: $VNC_TOKEN"
echo "VNC Password (Normal): $VNC_PWD"
echo "VNC Password (Viewonly): $VNC_PWD_VIEWONLY"
echo
